# -*- coding: utf-8 -*-
import os.path
import sys
import re
import os


f = open(sys.argv[1])
temp = None
files = []
while 1:
  line = f.readline()
  if not line:
     break
    
  files.append(line);

positive = open("positive.txt","w")
negative = open("negative.txt","w")


for el in files:
  if el.find("-")>0:
    negative.write(el)
    
  else:
    positive.write(el)
  print el

negative.close()
positive.close()